package com.week3.day01;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class DateDemo01 {
    public static void main(String[] args) throws ParseException {
        long now = System.currentTimeMillis();
        String myBirth = "1998-05-25 00:00:00";
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        long cha = now - simpleDateFormat.parse(myBirth).getTime();
        System.out.println(cha);
        Date test = new Date(0);
        System.out.println(test.getTime());
    }
}
